/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏样式 */
.navbar {
    background-color: #3f51b5 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link {
    color: white !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.navbar-dark .navbar-nav .nav-link.active {
    color: white !important;
    font-weight: bold;
}

/* 头部样式 */
header {
    background-color: #3f51b5;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

header h1 {
    text-align: center;
    margin-bottom: 1rem;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

/* 主内容区域样式 */
main {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

h2 {
    color: #3f51b5;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

h3 {
    color: #3f51b5;
    margin: 15px 0 10px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

table th, table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

table tr:hover {
    background-color: #f9f9f9;
}

.overdue {
    color: #f44336;
    font-weight: bold;
}

/* 表单样式 */
form {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #3f51b5;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="tel"],
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 5px rgba(63, 81, 181, 0.3);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s;
    margin-right: 10px;
}

.btn:hover {
    background-color: #303f9f;
}

.btn-small {
    padding: 4px 8px;
    font-size: 14px;
    margin-right: 5px;
}

.btn-danger {
    background-color: #f44336;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-primary {
    background-color: #4caf50;
}

.btn-primary:hover {
    background-color: #388e3c;
}

.form-actions {
    margin-top: 20px;
    text-align: center;
}

/* 操作栏样式 */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 搜索栏样式 */
.search-bar {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.search-bar select {
    width: auto;
    margin-right: 10px;
}

.search-bar input[type="text"] {
    width: 250px;
    margin-right: 10px;
}

/* 首页特定样式 */
.welcome {
    text-align: center;
    margin-bottom: 30px;
}

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.feature {
    flex: 1;
    min-width: 250px;
    margin: 10px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.feature h3 {
    color: #3f51b5;
    margin-bottom: 10px;
}

.feature p {
    margin-bottom: 15px;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 15px 0;
    color: #777;
    font-size: 14px;
}

/* 图书信息样式 */
#book-info {
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-top: 10px;
}

#book-info div {
    margin-bottom: 8px;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .action-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-bar {
        width: 100%;
        margin-top: 10px;
    }
    
    .search-bar input[type="text"] {
        width: 100%;
    }
    
    .features {
        flex-direction: column;
    }
    
    table {
        font-size: 14px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 14px;
    }
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}

.alert strong {
    margin-right: 5px;
} 